@extends("la.layouts.app")

@section("contentheader_title")
    系统设置
@endsection
@section("contentheader_description", '系统设置')
@section("section", "系统设置")
@section("sub_section", "Edit")

@section("htmlheader_title", "系统设置")

@section("main-content")

    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <div class="box">
        <div class="box-header">

        </div>
        <div class="box-body">
            <div class="row">
                <div class="col-md-8 col-md-offset-2">
                    <form method="POST" action="/admin/settings" accept-charset="UTF-8" id="organization-edit-form" novalidate="novalidate">
                        {!! csrf_field() !!}
                        <div class="form-group">
                            <label for="name">提现费率 :</label>
                            <input class="form-control" name="percentage" value="{{ \App\Models\SettingsCache::get('fee_rate', 15) }}"/>
                        </div>
                        <div class="form-group">
                            <label for="name">运营状态 :</label>
                            <select name="is_running" class="form-control">
                                <option value="0" {{ 0 == \App\Models\SettingsCache::get('is_running', '1') ? 'selected' : '' }}>停止</option>
                                <option value="1" {{ 1 == \App\Models\SettingsCache::get('is_running', '1') ? 'selected' : '' }}>运营</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="name">联系客服图片网址 :</label>
                            <input class="form-control" name="service_qr_url" value="{{ \App\Models\SettingsCache::get('service_qr_url', '') }}"/>
                            <img src="{{ \App\Models\SettingsCache::get('service_qr_url', '') }}" alt="" style="width: 256px;height: 256px;">
                        </div>
                        <div class="form-group">
                            <input class="btn btn-success" type="submit" value="修改">
                            <button type="button" class="btn btn-default pull-right">
                                <a href="/admin/wechat-upload">返回</a>
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

@endsection

@push('scripts')
    <script></script>
@endpush
